<?php
    require('./Utils.php');

    $post = getJsonParamter();

    $id = $post['id'];

    $conn = getConnection();
    $sql = "DELETE FROM pet WHERE id = ?";

    $result = execute($conn, $sql, $id);

    if($result){
        getJson(200, '删除宠物成功', null);
    }else{
        getJson(500, '删除宠物失败', null);
    }
?>